#!/bin/bash

rm mosquitto
g_Sh_cross_tool=aarch64-linux-gnu-

make WITH_SRVSRV=no CC=$g_Sh_cross_tool'gcc' CXX=$g_Sh_cross_tool'g++' -Wall WITH_CJSON=no CFLAGS="-I $(pwd)/../OpenSSL_1_1_1-stable/_install/include/" LDFLAGS="-L /usr/lib/x86_64-linux-gnu -L $(pwd)/../OpenSSL_1_1_1-stable/_install/lib -lssl -lcrypto -lpthread -ldl -lm"

make DESTDIR=$(pwd)/_install install
make clean
cp _install/usr/local/sbin/mosquitto ./
